class DeviceReportCmdModel {
  String? type;
  DeviceReportCmdModelData? data;

  DeviceReportCmdModel({this.type, this.data});

  DeviceReportCmdModel.fromJson(Map json) {
    type = json['type'];
    data = json['data'] != null
        ? DeviceReportCmdModelData.fromJson(json['data'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = {};
    data['type'] = type;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    return data;
  }
}

class DeviceReportCmdModelData {
  String? sModel;
  String? sType;
  String? cmd;
  ReportCmdModelData? data;
  String? id;
  int? model;

  DeviceReportCmdModelData(
      {this.sModel, this.sType, this.cmd, this.data, this.id, this.model});

  DeviceReportCmdModelData.fromJson(Map<String, dynamic> json) {
    sModel = json['_model'];
    sType = json['_type'];
    cmd = json['cmd'];
    data =
        json['data'] != null ? ReportCmdModelData.fromJson(json['data']) : null;
    id = json['id'];
    model = json['model'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = {};
    data['_model'] = sModel;
    data['_type'] = sType;
    data['cmd'] = cmd;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    data['id'] = id;
    data['model'] = model;
    return data;
  }
}

class ReportCmdModelData {
  String? power;
  int? reportTimestamp;

  ReportCmdModelData({this.power, this.reportTimestamp});

  ReportCmdModelData.fromJson(Map<String, dynamic> json) {
    power = json['power'];
    reportTimestamp = json['report_timestamp'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = {};
    data['power'] = power;
    data['report_timestamp'] = reportTimestamp;
    return data;
  }
}
